Lesson 2

   In Lesson 2 we will cover the HTML that you enter that is visible in your web page. HTML like images fonts and font decoration.


Fonts size, face, color


   The <FONT> element applies formatting parameters to text. It allows specifying font size, font face and color.

<font size="2">
<font face="Times New Roman">
<font color="#0000FF">

   <font size="2">This attribute defines the size of fonts. Its value is a number from 1 to 7, 1 being the smallest and 7 the largest. The value can also be expressed indicating a relative variation of the size, using +n or -n where "n" is a number: +2 for 2 sizes larger, -1 for 1 size smaller, etc.

   <font face="Times New Roman"> This attribute defines a list of font faces that may be used to display selected text. Fonts are separated by commas and placed by order of preference.

   <font color="#0000FF"> This attribute indicates the color to be applied to selected text. It can also be used to define the color of an horizontal line (<HR> element).

Attributes:
class
color
face
id
lang
size
style
title
W3C
dir
Netscape Navigator
point-size
weight
Internet Explorer
language



Font decoratives


   <B> element applies bold style to text. The </B> is required at the end of the text that you want the bold style on.

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <BIG> element increased the width and size of fonts in the screen. </BIG> is required at the end of the fonts you wish to increase the width and size of.

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <EM> emphasizes the text enclosed. By default, enclosed text is displayed in italics. However, formatting can be controlled using styles. The </EM> is required at the end of the text enclosed which u wish to italic.

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <I> element formats text in italics. The </I> is required at the end of the text that you want the italic format on.

   The <S> element displays the enclosed text with an horizontal line over it (strikethrough). It is equivalent to the <STRIKE> element. The </S> is required at the end of the text that you want an horizontal line over it (strikethrough).

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <STRIKE> element displays the enclosed text with an horizontal line over it (strikethrough). It is the equivalent of the <S> element. The </STRIKE> is required at the end of the text that you want an horizontal line over it (strikethrough).

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <STRONG> element is similar to the <B> element. It displays the enclosed text in thick or bold font. The </STRONG> is required at the end of the text that you want the Strong style on.

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <SUB> element displays the enclosed text as subscript (slightly below the baseline). The </SUB> is required at the end of the text that you want displayed as a subscript (slightly below the baseline).

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <SUP> element displays enclosed text as superscript (slightly above the baseline). The </SUP> is required at the end of the text that you want displayed as a superscript (slightly above the baseline).

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <TT> element displays text as «Teletype» or a typewriter style which uses a fixed-width font. The </TT> is required at the end of the text that you want to be displayed as a «Teletype» or typewriter style.

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <U> element underlines the text it encloses. The </U> is required at the end of the text that you want to be enclosed in it.

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <VAR> element displays text in a special font to indicate that it is a variable. By default, text is displayed in a fixed-width font. The </VAR> is required at the end of the text that you wish to be displayed in a special font to indicate that it is a variable.

Attributes:
class
id
lang
style
title
W3C

Internet Explorer
language

   The <XMP> element displays text enclosed in fixed-width font to indicate said text is an example. The </XMP> is required at the end of the text that you wish to be enclosed in a fixed-width font to indicate said text is an example.

Attributes:
class
id
lang
style
Internet Explorer
language
title

Heading


   Six heading levels can be defined in an HTML document, the first level being <H1> and the last level <H6>. Each of these elements have default formatting values and each heading is treated as a paragraph. Formatting can be controlled using styles. The </H1> is required at the end of the heading. Examples:

<H1>Wazup!</H1>

Wazup!

<H6>Wazup!</H6>
Wazup!

Attributes:
align
class
id
lang
style
title
W3C
dir
Internet Explorer
language

Alignment

   The ALIGN attribute indicates the horizontal alignment of the element’s content. Possible values are:

left:      Text aligned to the left.
center:  Centered text.
right:    Text aligned to the right.
justify:  Justified text lines.

Center

   The <CENTER> element is used to center the part of the document which it frames.

Attributes:
align
class
id
lang
style
title
W3C
dir
Internet Explorer
language

Linking

   The <A> element is used to define an anchor; either to place an anchor in a document, or to define a hyperlink, or both.

Anchor:<A name="anchorname"> text or location on the text </A>
Hyperlink:<A href="http://www.domain.com"> text or <IMG…> hyperlink image </A>
Both:<A name="anchorname" href="http://www.domain.com"> Text or <IMG…> hyperlink image </A>


Attributes:
accesskey
class
href
id
lang
name
rel
rev
style
tabindex
target
title
W3C
charset
coords
dir
hreflang
shape
type
Internet Explorer
datafld
datasrc
language
methods
urn

Imaging

   The <IMG> element contains the necessary information for displaying an image in the position where it is found in the document.

Example:
<IMG SRC="cdomain.jpg" align="texttop" height="80" width="244">
TextTop

Making a picture a hyperlink:
<A HREF="crosshome.cjb.net" TARGET="_new"><IMG SRC="cdomain.jpg" BORDER="0" ALT="Cross's Domain"></A>

The Making a picture a hyperlink:
   The <A HREF="crosshome.cjb.net" element if for the hyperlink.
   The TARGET="_new"> element is to specify what window or are of text this specific link is goin to (_new opens a new web browser window).
   The <IMG SRC="cdomain.jpg" element embeds the picture onto your website.
   The BORDER="0" element creates a 0 amount of border around the picture.
   The ALT="Cross's Domain"> element labels the picture incase it does not load, and names it on mouse over.

Example:
Cross's Domain

Attributes:
align
alt
border
class
height
hspace
id
ismap
lang
lowsrc
src
style
title
usemap
vspace
width
W3C
dir
longdesc
Netscape Navigator
suppress
Internet Explorer
controls
datafld
datasrc
dynsrc
language
loop
loopdelay
start

Previous Lesson |  Index of HTML Tutorial |  Next Lesson |